<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8"> </meta>
    <title>Title</title>
    <script src="/static/assets/plugins/bootbox/bootbox.min.js"  type="text/javascript"></script>

    <script type="text/javascript">

        $(function () {
            $("#saveProject").click(function(){


                var data = {};

                $("#form input").each(function(){

                    var $this = $(this);
                    data[$this.attr('name')] = $this.val();
                });
                console.log(data);
                $.ajax({
                    url:"/project/save",
                    type:"POST",
                    data: JSON.stringify(data),
                    contentType: 'application/json;charset=utf-8',
                    success:function (backData) {
                        if(backData && backData.code){

                            bootbox.alert("保存项目数据成功!");
                        }
                    },
                    fail: function (err, status) {
                        console.log(err)
                    }
                });
            });
        });
    </script>
</head>
<body>
<div class="row">
    <div class="col-md-12">
        <!-- BEGIN PAGE TITLE & BREADCRUMB-->
        <h3 class="page-title">
            构建项目 <small>录入项目信息</small>
        </h3>
        <ul class="page-breadcrumb breadcrumb">
            <li class="btn-group">
                <button type="button" class="btn blue dropdown-toggle" data-toggle="dropdown" data-hover="dropdown" data-delay="1000" data-close-others="true">
							<span>
								Actions
							</span>
                    <i class="fa fa-angle-down"></i>
                </button>
                <ul class="dropdown-menu pull-right" role="menu">
                    <li>
                        <a href="#">
                            Action
                        </a>
                    </li>
                    <li>
                        <a href="#">
                            Another action
                        </a>
                    </li>
                    <li>
                        <a href="#">
                            Something else here
                        </a>
                    </li>
                    <li class="divider">
                    </li>
                    <li>
                        <a href="#">
                            Separated link
                        </a>
                    </li>
                </ul>
            </li>
            <li>
                <i class="fa fa-home"></i>
                <a href="index.html" tppabs="http://www.keenthemes.com/preview/metronic_admin/index.html">
                    主页
                </a>
                <i class="fa fa-angle-right"></i>
            </li>
            <li>
                <a href="#">
                    构建项目
                </a>
                <i class="fa fa-angle-right"></i>
            </li>
            <li>
                <a href="#">
                    录入信息
                </a>
            </li>
        </ul>
        <!-- END PAGE TITLE & BREADCRUMB-->
    </div>
</div>

<div class="portlet box green">
    <div class="portlet-title">
        <div class="caption">
            <i class="fa fa-reorder"></i>项目信息录入
        </div>
        <div class="tools">
            <a href="javascript:;" class="collapse">
            </a>
            <a href="#portlet-config" data-toggle="modal" class="config">
            </a>
            <a href="javascript:;" class="reload">
            </a>
            <a href="javascript:;" class="remove">
            </a>
        </div>
    </div>
    <div class="portlet-body form">
        <!-- BEGIN FORM-->
        <form action="#" class="form-horizontal" id="form">
            <div class="form-body">
                <div class="form-group">
                    <label class="col-md-3 control-label">项目名称</label>
                    <div class="col-md-4">
                        <input type="text" name="projectName" class="form-control" placeholder="输入项目名称">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-md-3 control-label">模块名称</label>
                    <div class="col-md-4">
                        <input type="text" name="moduleName" class="form-control" placeholder="请输入包名">
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-md-3 control-label">包名</label>
                    <div class="col-md-4">
                        <input type="text" name="packageName" class="form-control" placeholder="请输入包名">
                    </div>
                </div>

            <div class="form-actions fluid">
                <div class="col-md-offset-3 col-md-9">
                    <button id="saveProject" type="submit" class="btn blue">保存</button>
                    <button type="button" class="btn default">取消</button>
                </div>
            </div>
        </form>
        <!-- END FORM-->
    </div>
</div>
</body>
</html>